﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;
using ZgOffice.Entities;
using System.Data;

namespace ZgOffice.IServices
{
    [ServiceContract(Namespace = "http://www.WCFStudy8.net/2009/08/06")]
    public interface IOfficeService
    {
        [OperationContract]
        int Sum(params int[] numbers);
        [OperationContract]
        bool Login(LoginType lt);
        [OperationContract]
        DataSet ReadSystemListTreeView();
        [OperationContract]
        DataSet ReadDIYTable(string tableName);
        [OperationContract]
        DataSet ReadDiyTableListTreeView();
        [OperationContract]
        DataSet ReadSysListTree();
        /// <summary>
        /// 获取所用压缩后字节流
        /// <summary>
        /// <returns></returns>
        [OperationContract]
        byte[] GetAllBuffer();
        /// <summary>
        /// 设置压缩后字节流分块，每一块的大小
        /// </summary>
        /// <param name="length"></param>
        [OperationContract]
        void SetBufferLength(int length);
        /// <summary>
        /// 读取压缩后字节流一块，并提升字节流的位置
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        bool ReadNextBuffer();
        /// <summary>
        /// 获取当前块的字节流
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        byte[] GetCurrentBuffer();       
    }
}
